﻿using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;

public class DeviceID{
    [DllImport("__Internal")]
    private static extern string GetIphoneADID();

    public static string Get() {

#if UNITY_EDITOR
        return SystemInfo.deviceUniqueIdentifier;

#elif UNITY_IPHONE  
        string iID = GetIphoneADID();
        return "IOS-"+iID;

#else
        return SystemInfo.deviceUniqueIdentifier;
#endif

    }
}
